package com.accp.demo.service.sale;

import java.util.List;
import java.util.Map;
import com.accp.demo.mapper.sale.IStockTiaoboMapper;
import com.accp.demo.pojo.PageBean;
import com.accp.demo.pojo.sale.StockTiaobo;



public class StockTiaoboservice {
private IStockTiaoboMapper tiaoMapper;
/**
 * pageBean分页查询
 * @param map
 * @return
 */
public PageBean queryByPage(Integer currPage,Integer pageSize){
	int count=this.tiaoMapper.queryCount();
	List<StockTiaobo> tiaobo=this.tiaoMapper.queryBypage((currPage-1)*pageSize, pageSize);
	PageBean pb=new PageBean(count, pageSize, currPage, tiaobo);
	return pb;
}
/**
 * 主祥查询
 */
public StockTiaobo queryStockTiaobobyid(String sid){
	return tiaoMapper.queryStockTiaobobyid(sid);
}
/**
 * 新增
 * */
public void saveStockTiaobo(StockTiaobo tiaobo){
	 tiaoMapper.saveStockTiaobo(tiaobo);
}
/**
 * 删除
 */
public void updateStockTiaobostate(String sid){
	tiaoMapper.updateStockTiaobostate(sid);
}
}
